package com.software.glide;

import com.bumptech.glide.annotation.GlideExtension;
import com.bumptech.glide.annotation.GlideOption;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.BaseRequestOptions;

@GlideExtension
public class TimiGlideExtension {
    private TimiGlideExtension() {

    }

    @GlideOption
    public static BaseRequestOptions<?> defaultImage(BaseRequestOptions<?> options){
        return options
                .placeholder(R.mipmap.loading)
                .error(R.mipmap.loading_error)
                .fallback(R.mipmap.empty)
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .circleCrop();  //  圆形
    }
}
